import api from './path'
import axios from 'axios'

//获取图片
export const getImg = async () => {
  try {
    const response = await axios.get(api.path + '/banner')
    return response.data
  } catch (error) {
    console.error('获取banner失败:', error)
    throw error
  }
}
export const search = async (data) => {
  try {
    const response = await axios.post(api.path + '/search', data)
    return response.data
  } catch (error) {
    console.error('搜索失败:', error)
    throw error
  }
}
